﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using Bingosoft.Web.Utils;
using HHMMS.Core.Service;

namespace HHMMS.UI.Modules.MaterialDirectory
{
    public partial class MaterialDirectoryList : FormPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void SearchGrid(object sender, EventArgs e)
        {
            this.GridSearch.Search();
        }

        protected void RefreshGrid(object sender, EventArgs e)
        {
            this.GridSearch.Refresh();
        }

        protected void DeleteUser(object sender, EventArgs e)
        {
            ImageButton ctr = sender as ImageButton;
            String userId = ctr.Attributes["_MaterialsNo"];

            MaterialDirectoryService.Instance.Delete(userId);

            this.GridSearch.Search();
        }

    }
}